#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

#define SWAP(num) ((((num)&(0xaaaaaaaa))>>1)+(((num)&(0x55555555))<<1))   

void PrintBinary(int num)
{
	if (num > 1)
	{
		PrintBinary(num / 2);
	}
	printf("%d", num % 2);
}

int main()
{
	int num = 10;
	PrintBinary(num);
	printf("\n");
	num = SWAP(num);
	printf("Swap:");
	PrintBinary(num);
	return 0;
}